package com.zbkj.crmeb.enums;

/**
 * x
 *
 * @author muyu.myw
 * @date 2020/9/28 18:58
 */
public enum LogisticsModeEnum {
    /**
     * 物流模板
     */
    TNL(0,""),
    ODM(1,"海外直邮(DHL)"),
    CDM(2,"跨境直邮");
    Integer code;
    String name;

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    LogisticsModeEnum(Integer code, String name){
        this.code = code;
        this.name = name;
    }

    public static String getNameByCode(Integer code){
        if(code != null){
            for(LogisticsModeEnum val : LogisticsModeEnum.values()){
                if(val.code.equals(code)){
                    return val.getName();
                }
            }
        }
        return "";
    }
}
